package com.scmt.hmzd.entity;

import lombok.Data;

@Data
public class AccessToken {

    private String accessToken;
    private long expiresTime;


    public AccessToken(String accessToken, String expiresIn) {
        super();
        this.accessToken = accessToken;

        expiresTime = System.currentTimeMillis() + Integer.parseInt(expiresIn) * 1000;
    }
    //返回是否过期
    public boolean isExpires() {
        return System.currentTimeMillis() > expiresTime;
    }
}
